package com.itheima.sms.controller;

import com.itheima.sms.service.SmsService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
@Slf4j
public class OrderController {

    @DubboReference
    private SmsService smsService;

    @GetMapping("add")
    public String add(){
        log.info("[订单-创建订单]");
        log.info("[订单-]短信通知卖家发货");
        smsService.send("18888888","您的订单xxxxxxxx01付款,发货");
        return "success";
    }
}
